FMOD Engine User Manual 2.02
An interface that manages Digital Signal Processor (DSP) Connections
Mix Properties:
General:
Retrieves the connection's input DSP unit.
FMOD_RESULT DSPConnection::getInput(
DSP **input
);
FMOD_RESULT FMOD_DSPConnection_GetInput(
FMOD_DSPCONNECTION *dspconnection,
FMOD_DSP **input
);
RESULT DSPConnection.getInput(
out DSP input
);
DSPConnection.getInput(
input
);
If DSP::addInput was just called, the connection might not be ready because the DSP system is still queued to be connected, and may need to wait several milliseconds for the next mix to occur. If so the function will return FMOD_ERR_NOTREADY and input will be null.
See Also: DSPConnection::getOutput, DSP::addInput
Retrieves the connection's volume scale.
FMOD_RESULT DSPConnection::getMix(
float *volume
);
FMOD_RESULT FMOD_DSPConnection_GetMix(
FMOD_DSPCONNECTION *dspconnection,
float *volume
);
RESULT DSPConnection.getMix(
out float volume
);
DSPConnection.getMix(
volume
);
Volume scale applied to the input before being passed to the output. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.
See Also: DSPConnection::setMix
Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).
FMOD_RESULT DSPConnection::getMixMatrix(
float *matrix,
int *outchannels,
int *inchannels,
int inchannel_hop = 0
);
FMOD_RESULT FMOD_DSPConnection_GetMixMatrix(
FMOD_DSPCONNECTION *dspconnection,
float *matrix,
int *outchannels,
int *inchannels,
int inchannel_hop
);
RESULT DSPConnection.getMixMatrix(
float[] matrix,
out int outchannels,
out int inchannels,
int inchannel_hop = 0
);
DSPConnection.getMixMatrix(
matrix,
outchannels,
inchannels,
inchannel_hop
);
Two dimensional array of volume levels in row-major order. Each row represents an output speaker, each column represents an input channel. Passing null or equivalent as the matrix allows querying of outchannels and inchannels.
matrix. Optional only when matrix is null or equivalent.matrix. Optional only when matrix is null or equivalent.matrix. Can be larger than inchannels to represent a smaller valid region inside a larger matrix.A matrix element is referenced from the incoming matrix data as outchannel * inchannel_hop + inchannel.
See Also: DSPConnection::setMixMatrix
Retrieves the connection's output DSP unit.
FMOD_RESULT DSPConnection::getOutput(
DSP **output
);
FMOD_RESULT FMOD_DSPConnection_GetOutput(
FMOD_DSPCONNECTION *dspconnection,
FMOD_DSP **output
);
RESULT DSPConnection.getOutput(
out DSP output
);
DSPConnection.getOutput(
output
);
If DSP::addInput was just called, the connection might not be ready because the DSP system is still queued to be connected, and may need to wait several milliseconds for the next mix to occur. If so the function will return FMOD_ERR_NOTREADY and output will be null.
See Also: DSPConnection::getInput, DSP::addInput
Retrieves the type of the connection between 2 DSP units.
FMOD_RESULT DSPConnection::getType(
FMOD_DSPCONNECTION_TYPE *type
);
FMOD_RESULT FMOD_DSPConnection_GetType(
FMOD_DSPCONNECTION *dspconnection,
FMOD_DSPCONNECTION_TYPE *type
);
RESULT DSPConnection.getType(
out DSPCONNECTION_TYPE type
);
DSPConnection.getType(
type
);
Retrieves a user value associated with this object.
FMOD_RESULT DSPConnection::getUserData(
void **userdata
);
FMOD_RESULT FMOD_DSPConnection_GetUserData(
FMOD_DSPCONNECTION *dspconnection,
void **userdata
);
RESULT DSPConnection.getUserData(
out IntPtr userdata
);
DSPConnection.getUserData(
userdata
);
This function allows arbitrary user data to be retrieved from this object. See the User Data section of the glossary for an example of how to get and set user data.
Sets the connection's volume scale.
FMOD_RESULT DSPConnection::setMix(
float volume
);
FMOD_RESULT FMOD_DSPConnection_SetMix(
FMOD_DSPCONNECTION *dspconnection,
float volume
);
RESULT DSPConnection.setMix(
float volume
);
DSPConnection.setMix(
volume
);
Volume scale applied to the input before being passed to the output. 0 = silent, 1 = full. Negative level inverts the signal. Values larger than 1 amplify the signal.
See Also: DSPConnection::getMix, DSPConnection::setMixMatrix, DSPConnection::getMixMatrix
Sets a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).
FMOD_RESULT DSPConnection::setMixMatrix(
float *matrix,
int outchannels,
int inchannels,
int inchannel_hop = 0
);
FMOD_RESULT FMOD_DSPConnection_SetMixMatrix(
FMOD_DSPCONNECTION *dspconnection,
float *matrix,
int outchannels,
int inchannels,
int inchannel_hop
);
RESULT DSPConnection.setMixMatrix(
float[] matrix,
int outchannels,
int inchannels,
int inchannel_hop = 0
);
DSPConnection.setMixMatrix(
matrix,
outchannels,
inchannels,
inchannel_hop
);
Two dimensional array of volume levels in row-major order. Each row represents an output speaker, each column represents an input channel. Null or equivalent sets a 'default' matrix.
Number of output channels (rows) in matrix.
Number of input channels (columns) in matrix.
matrix. Can be larger than inchannels to represent a smaller valid region inside a larger matrix.inchannelsA matrix element is referenced from the incoming matrix data as outchannel * inchannel_hop + inchannel.
If null or equivalent is passed in via matrix a default upmix, downmix, or unit matrix will take its place. A unit matrix allows a signal to pass through unchanged.
Example 5.1 unit matrix:
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
Matrix element values can be below 0 to invert a signal and above 1 to amplify the signal. Note that increasing the signal level too far may cause audible distortion.
See Also: DSPConnection::getMixMatrix
Sets a user value associated with this object.
FMOD_RESULT DSPConnection::setUserData(
void *userdata
);
FMOD_RESULT FMOD_DSPConnection_SetUserData(
FMOD_DSPCONNECTION *dspconnection,
void *userdata
);
RESULT DSPConnection.setUserData(
IntPtr userdata
);
DSPConnection.setUserData(
userdata
);
This function allows arbitrary user data to be attached to this object. See the User Data section of the glossary for an example of how to get and set user data.
See Also: DSPConnection::getUserData
List of connection types between 2 DSP nodes.
typedef enum FMOD_DSPCONNECTION_TYPE {
FMOD_DSPCONNECTION_TYPE_STANDARD,
FMOD_DSPCONNECTION_TYPE_SIDECHAIN,
FMOD_DSPCONNECTION_TYPE_SEND,
FMOD_DSPCONNECTION_TYPE_SEND_SIDECHAIN,
FMOD_DSPCONNECTION_TYPE_MAX
} FMOD_DSPCONNECTION_TYPE;
enum DSPCONNECTION_TYPE
{
STANDARD,
SIDECHAIN,
SEND,
SEND_SIDECHAIN,
MAX,
}
FMOD.DSPCONNECTION_TYPE_STANDARD
FMOD.DSPCONNECTION_TYPE_SIDECHAIN
FMOD.DSPCONNECTION_TYPE_SEND
FMOD.DSPCONNECTION_TYPE_SEND_SIDECHAIN
FMOD.DSPCONNECTION_TYPE_MAX
FMOD_DSP_CONNECTION_TYPE_STANDARD
Default DSPConnection type. Audio is mixed from the input to the output DSP's audible buffer, meaning it will be part of the audible signal. A standard connection will execute its input DSP if it has not been executed before.
FMOD_DSP_CONNECTION_TYPE_SIDECHAIN
Sidechain DSPConnection type. Audio is mixed from the input to the output DSP's sidechain buffer, meaning it will NOT be part of the audible signal. A sidechain connection will execute its input DSP if it has not been executed before.
The purpose of the seperate sidechain buffer in a DSP, is so that the DSP effect can privately access for analysis purposes. An example of use in this case, could be a compressor which analyzes the signal, to control its own effect parameters (ie a compression level or gain).
For the effect developer, to accept sidechain data, the sidechain data will appear in the FMOD_DSP_STATE struct which is passed into the read callback of a DSP unit.
FMOD_DSP_STATE::sidechaindata and FMOD_DSP_STATE::sidechainchannels will hold the mixed result of any sidechain data flowing into it.
FMOD_DSP_CONNECTION_TYPE_SEND
Send DSPConnection type. Audio is mixed from the input to the output DSP's audible buffer, meaning it will be part of the audible signal. A send connection will NOT execute its input DSP if it has not been executed before.
A send connection will only read what exists at the input's buffer at the time of executing the output DSP unit (which can be considered the 'return')
FMOD_DSP_CONNECTION_TYPE_SEND_SIDECHAIN
Send sidechain DSPConnection type. Audio is mixed from the input to the output DSP's sidechain buffer, meaning it will NOT be part of the audible signal. A send sidechain connection will NOT execute its input DSP if it has not been executed before.
A send sidechain connection will only read what exists at the input's buffer at the time of executing the output DSP unit (which can be considered the 'sidechain return').
For the effect developer, to accept sidechain data, the sidechain data will appear in the FMOD_DSP_STATE struct which is passed into the read callback of a DSP unit.
FMOD_DSP_STATE::sidechaindata and FMOD_DSP_STATE::sidechainchannels will hold the mixed result of any sidechain data flowing into it.
See Also: DSP::addInput, DSPConnection::getType